﻿//
// Copyright (c) 2024 BPer
//

#ifndef BPERENCODER_INCLUDE_BPERVideoENCODER_H_
#define BPERENCODER_INCLUDE_BPERVideoENCODER_H_
#include <bperutil/BPerAvInfoType.h>
#include "stdint.h"
#include "BPerEncoder.h"
typedef struct{
	BPerRequestType request;
	int32_t requestValue;
}BPerRtcEncoderMessage;
class BPerVideoEncoder{
public:
	BPerVideoEncoder();
	virtual ~BPerVideoEncoder();
    virtual  int32_t init(BPerContext* pcontext,BPerVideoInfo* pvideoInfo)=0;
	virtual int32_t encode(BPerFrame* pframe, BPerEncoderCallback* pcallback)=0;
	virtual void setVideoMetaData(BPerVideoMeta *pvmd)=0;
	virtual void sendMsgToEncoder(BPerRtcEncoderMessage *msg)=0;
protected:
    int32_t m_isInit;
    BPerVideoInfo m_videoInfo;
    BPerVideoEncInfo m_enc;
    uint8_t* m_vbuffer;
   void setVideoPara(BPerVideoInfo *pap,BPerVideoEncInfo *penc);
};

#endif /* BPERENCODER_INCLUDE_BPERENCODER_H_ */
